let userData = [
    {
        username: "xiaohei",
        password: 123
    },
    {
        username: "xiaobai",
        password: 123
    }
]

export default [
    {
        url: '/admin/user/login',
        method: "post",
        response(req) {
            let {
                username,
                password
            } = req.body
            let user = userData.some(item => item.username === username && item.password === password)
            if (!user) {
                return {
                    code: 401,
                    msg: "账号密码错误!",
                }
            }
            else {
                return {
                    code: 200,
                    msg: "登录成功",
                }
            }
        }
    }
]